package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class Class6Controller {

//    @GetMapping("/hello")
    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String testHello() {
        return "welcome.jsp";
    }

    @GetMapping("/second")
    public String second(@RequestParam("u1") String u1,@RequestParam("p1") String p1) {
        System.out.println(u1 +"p1=" + p1);
        return "second.jsp";
    }
}
